from django.db import models
from django.contrib.auth.models import AbstractUser


class UserProfile(AbstractUser):
    """
    用户系统
    """
    SEX = (
        ('1', '男'),
        ('2', '女')
    )
    username = models.CharField(max_length=50, unique=True, null=False)
    password = models.CharField(max_length=255, null=False)
    # uid = models.IntegerField(primary_key=True)
    # phoneNumber = models.CharField(max_length=11, unique=True)
    avatar_path = models.CharField(max_length=200, default="https://bilimili2.oss-cn-beijing.aliyuncs.com/imgs/default.png")
    email = models.EmailField(null=True,blank=True)
    sex = models.CharField(choices=SEX, max_length=1, default='1', verbose_name="性别")
    # register_date = models.DateTimeField()
    description = models.TextField(default='这个人很懒，什么都没有写~')
    is_mup = models.BooleanField(default=False)
